#include "YJDialog.h"

#include <iostream>


/** INIT OF STATIC CALLBACKS for registering java - C++ class **/
ydialog_constructor_callback YJDialog::constructor_cb=NULL;
simple_callback YJDialog::activate_cb=NULL;
simple_callback YJDialog::open_internal=NULL;

/**
YJDialog::YJDialog()
	:YDialog(NULL,NULL)
	{
		std::cout << "YJDialog empty constructor called" << std::endl;
}*/

YJDialog::YJDialog(int parrentId,  YDialogType	dialogType, YDialogColorMode	colorMode)
	:YDialog(dialogType, colorMode){
	classId = constructor_cb(parrentId, dialogType, colorMode);
	std::cout << "YJDialog constructor called" << std::endl;
}

void YJDialog::activate(){
	activate_cb(classId);
	return ;
}

void YJDialog::openInternal(){
	open_internal(classId);
	return;
}

YEvent * YJDialog::waitForEventInternal( int timeout_millisec ){
	std::cout << "FIXME waitForEventInternal" << std::endl;
	return NULL;
}

YEvent * YJDialog::pollEventInternal(){
	std::cout << "FIXME poolEvent" << std::endl;
	return NULL;
}

void YJDialog::test(){
	activate();
	openInternal();
}

/**
int main(int argc, char **argv) {
    
	//YJDialog d = new YJDialog(NULL, NULL);
	YJDialog *d = new YJDialog(YMainDialog,YDialogNormalColor);
	std::cout << "YJDialog created" << std::endl;
    return 0;
}**/

